package RandVars;
import java.util.Random;

public class GIRandVar extends RandVar {

	protected Random random;
	protected long from;
	protected long to;

	public GIRandVar(double mean) {
		super(mean);
		random = new Random();
	}

	public GIRandVar(long from, long to, int seed) {
		super((from + 2) / 2);
		random = new Random(seed);
		this.from = from;
		this.to = to;
	}
	
	public GIRandVar(long from, long to){
		super((from + 2) / 2);
		random = new Random();
		this.from = from;
		this.to = to;
	}

	@Override
	public long getLongRV() {
		return (random.nextInt((int) (to+1-from)) + from);
	}

}
